Load balancing involves providing several pieces of equipment which share a given workload that cannot be handled by a single piece of equipment. Depending upon the type of equipment, several techniques are now used. In the case of web servers, load balancing can be achieved by using a network dispatcher, the function of which is to distribute the task among several web servers transparently to the web customer.
The problem of load balancing is also raised with routers connecting servers to a network. When installed, a router is adapted to receive, on one interface, the traffic from different servers. When the traffic becomes too heavy to handle, the router (because of throughput and/or because of the resources required in the router to process the received data such as CPU, memory, and so forth), it is necessary to introduce a second router that will be able to offload the first one.
A traditional way to split the traffic among several routers is to use the Virtual Route Routing Protocol (VRRP) to send the traffic to different routers. This protocol was created to overcome problems due to the failure of a router in a network using static routing. It allows the servers to see the redundant routers as a single virtual router. At any instant, only one router really owns the virtual router function based on the availability of the router interfaces or on static priorities associated with them by configuration. The interface having the highest priority is the one elected to own the virtual router interface. The associated router acts as a virtual router until it fails or until another interface with a higher priority appears.
The mode of operation using the VRRP protocol is preferable where dynamic host configuration protocols such as DHCP are used. This typically provides configuration for an end host IP address and a default gateway. However, this creates a single point of failure. Loss of the default router results in a catastrophic event isolating all end hosts that are unable to detect any alternate path that may be available. VRRP is designed to eliminate the single point of failure. It specifies an election protocol that dynamically assigns responsibility for a virtual router to one of the VRRP routers. The election process provides dynamic backup in the forwarding responsibility if the primary router (the router having the highest priority) becomes unavailable.
In the above type of configuration, the backup routers are inactive and their spare processing power is not used. However, nothing in the VRRP protocol prevents a router from participating in several elections of virtual routers in several VRRP groups. In practice, VRRP has been used to split the traffic on several routers. The idea is to have the routers participating in different VRRP groups with different priorities. Assuming there are two routers A and B, VRRP will be configured for a first VRRP group in such a way that router A will be the primary and router B will be the secondary. All traffic sent to the virtual router of this group will therefore flow through router A. At the same time, it is possible to configure the routers for another group where router B is the primary whereas router A is the secondary. All traffic sent to the virtual router of this second group will therefore flow through router B.
A drawback of this method is that it is purely static. When configuring the network, it is necessary to make a one-time choice of which flows will use which router. Consequently, the method cannot respond dynamically to changes in traffic, and, in other words, changing the balance of traffic among the routers requires explicit network reconfiguration.